#include "TextToSpeech.h"

int main()
{
	TextToSpeech ttsSpeech;
	ttsSpeech.Init();
	CString arrayVoicePackageName[50] = { "" };
	int nVoicePackageNameCount = 50;
	int nCount = ttsSpeech.EnumAudioToken(arrayVoicePackageName, nVoicePackageNameCount);
	ttsSpeech.CreateSpVoice();
	ISpObjectToken* ppToken = NULL;

	ttsSpeech.GetVoice(0, &ppToken);
	ttsSpeech.SetVoice(ppToken);


	ttsSpeech.SetRate(0);
	ttsSpeech.SetVolume(50);

	ttsSpeech.Speak("123");

	char* szText = NULL;
	strcpy(szText, "I:\\test.wav");
	ttsSpeech.SpeakToWaveFile("test", szText);

	ttsSpeech.DeleteSpVoice();
	ttsSpeech.Uninit();

	return 0;
}